/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package purgehelper.custom.controls;

import java.io.File;

/**
 *
 * @author leadiv
 */
class DropBoxLocation {
  private String filename, path, iconPath;
  private File f;

  public DropBoxLocation(File f,
		      String ip) {
    this.f = f;
    this.filename = f.isFile() ? f.getName() : "";
    this.path = f.getPath();
    setIconPath(ip);
  }

  /** String representation used in printouts and in JLists */

    @Override
  public String toString() {
        String output = "";

        output = this.f.isFile() ? "{FILE} " + this.filename + ": " : "{DIRECTORY} ";
        output += this.path;
    return(output);
  }

  /** Return country containing city or province named "Java". */

  public String getFilename() {
    return(filename);
  }

  /** Specify country containing city or province named "Java". */

  public void setFilename(String filename) {
    this.filename = filename;
  }

  /** Return comment about city or province named "Java".
   *  Usually of the form "near such and such a city".
   */

  public String getPath() {
    return(path);
  }

  /** Specify comment about city or province named "Java". */

  public void setPath(String path) {
    this.path = path;
  }

  /** Return path to image file of country flag. */

  public String getIconPath() {
    return(iconPath);
  }

  /** Specify path to image file of country flag. */

  public void setIconPath(String iconPath) {
    this.iconPath = iconPath;
  }
}
